import axios from 'axios';
import {
	createApp
} from 'vue'
import App from './App.vue'

import router from './router'
import './assets/css/global.css'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ELIcons from '@element-plus/icons-vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn'




const app = createApp(App)
app.use(ElementPlus, {
	locale: zhCn
})

for (let iconName in ELIcons) {
	app.component(iconName, ELIcons[iconName])
}


axios.defaults.baseURL = '/api'; //后端开发环境地址
axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'; //配置请求头信息。
app.config.globalProperties.$api = axios



app.use(router).mount('#app')
